<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>关键帧</title>
    <style>
        .outer{
            height:500px;
            border-bottom: 10px black solid;
            margin: 50px auto;
            overflow: hidden;
            
        }
        .box1{
            width:100px;
            height:100px;
            border-radius: 50%;
            background-color: aqua;
            animation: ball 1s forwards ease-in infinite;
        }
        .box2{
            
            width:100px;
            height:100px;
            border-radius: 50%;
            background-color:chartreuse;
            animation: ball 1s forwards ease-in infinite;
        }
        .box3{
            width:100px;
            height:100px;
            border-radius: 50%;
            background-color:darkorchid;
            animation: ball 1s forwards ease-in infinite;
        }
        .box4{
            width:100px;
            height:100px;
            border-radius: 50%;
            background-color:deeppink;
            animation: ball 1s forwards ease-in infinite;
        }
        .box5{
            width:100px;
            height:100px;
            border-radius: 50%;
            background-color:fuchsia;
            animation: ball 1s forwards ease-in infinite;
        }
        /*创建小球下落的画面*/
        @keyframes ball {
            from{
               margin-top: 0px; 
            }
            33%{
                margin-top:400px;
                /*减速运动*/
                animation-timing-function: ease-in;
            }
            66%{
                margin-top:100px;
            }
            to{
                margin-top: 400px;
                animation-timing-function: ease-in;
            } 
        }
    </style>
</head>
<body>
    <div class="outer">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
        <div class="box4"></div>
        <div class="box5"></div>
    </div>
</body>
</html>